//
//  UIView+Layout.h
//  test
//
//  Created by c on 2021/10/27.
//

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

@interface UIView (Layout)

@property CGPoint origin;
@property CGSize size;

@property (readonly) CGPoint bottomLeft;
@property (readonly) CGPoint bottomRight;
@property (readonly) CGPoint topRight;
@property (readonly) CGPoint topLeft;

@property CGFloat height;
@property CGFloat width;

@property CGFloat top;
@property CGFloat left;

@property CGFloat bottom;
@property CGFloat right;

@property CGFloat centerX;
@property CGFloat centerY;

@property CGFloat x;
@property CGFloat y;

@property CGFloat maxX;
@property CGFloat maxY;

/// 当前view的viewController
@property (nonatomic, readonly) UIViewController *viewController;

/// 添加subView
- (void)addSubViews:(NSArray<UIView*>*)views;

@end
